From 1eff9aba246a061133365516438c90d532ec74ac Mon Sep 17 00:00:00 2001 From: "mark@ecs.vuw.ac.nz" Date: Tue, 19 May 2009 16:08:21 +0200 Subject: [PATCH] Signalize that CUPS connection is available when EISCONN occurs Add test for EISCONN error when testing whether a connection to CUPS server is available (#576678 - patch by mark@ecs.vuw.ac.nz). Signed-off-by: Marek Kasik --- modules/printbackends/cups/gtkcupsutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c index af6e8d5a77..bcd03dc4be 100644 --- a/modules/printbackends/cups/gtkcupsutils.c +++ b/modules/printbackends/cups/gtkcupsutils.c @@ -1567,7 +1567,7 @@ gtk_cups_connection_test_get_state (GtkCupsConnectionTest *test) error_code = errno; - if (code == 0) + if (code == 0 || error_code == EISCONN) { close (test->socket); test->socket = -1; -- 2.30.2